package org.pc2r.util;

import java.io.Closeable;
import java.io.IOException;
import java.net.Socket;

public final class SystemUtil {

	static public Exception close(Closeable close) {
		if(close != null) {
			try {
			  if(close instanceof Socket) {
			    ((Socket) close).getOutputStream().close();
			    ((Socket) close).getInputStream().close();
			  }
				close.close();
			} catch (IOException e) {return e;}
		}
		return null;
	}
	
	private SystemUtil() {}
	
}
